Use alpha or opacity on a table row using CSS [migrated]

Posted by mserin on Pro Webmasters See other posts from Pro Webmasters or by mserin
Published on 2012-04-12T16:12:57Z Indexed on 2012/04/12 17:42 UTC
Read the original article Hit count: 423

Filed under:
|

I have a CSS stylesheet for a webpage. The webpage has a table with a background color of white (set in the rows, not the table). I would like to set the opacity or alpha to 50%. I have tried so many variations, but come up with no luck.

A typical row in the HTML file is:

<tr>
  <td>&nbsp;</td>
  <td>Twitter</td>
</tr>

The CSS settings for table rows (which works perfectly) is:

tr {
    font-family: Arial, Helvetica, sans-serif; background:rgb(255,255,255);  
}

To get the alpha, I tried

tr {
        font-family: Arial, Helvetica, sans-serif; background-color:rgba(255,255,255,0.5);  
    }

I have also tried background-color-opacity: 0.5;

Any other suggestions?

© Pro Webmasters or respective owner

Related posts about html

Related posts about css